﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using SyncWaterForPeople.Model;
using SyncWaterForPeople.Controller;

namespace SyncWaterForPeople
{
    /// <summary>
    /// Summary description for WebService
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class WebService : System.Web.Services.WebService
    {
        private SyncController controller = new SyncController();

        [WebMethod]
        public List<KardexWS> GetKardexList()
        {            
            return controller.GetKardexList();
        }

        [WebMethod]
        public List<UserWS> GetUserList()
        {            
            return controller.GetUserList();
        }

        [WebMethod]
        public List<CutSupplyWS> GetCutSupplies()
        {
            return controller.GetCutSupplies();
        }

        [WebMethod]
        public List<ReconnectionWS> GetReconnections()
        {
            return controller.GetReconnections();
        }

        [WebMethod]
		public decimal GetBaseWaterConsume()
		{
			return controller.GetBaseWaterConsume();
		}

		[WebMethod]
		public void SaveWaterReadingList(List<WaterReadingWS> list)
		{
			controller.SaveWaterReadingList(list);
		}

		[WebMethod]
		public void SaveCutSupplyList(List<CutSupplyWS> list)
		{
			controller.SaveCutSupplyList(list);
		}

		[WebMethod]
		public void SaveReconnectionList(List<ReconnectionWS> list)
		{
			controller.SaveReconnectionList(list);
		}

		[WebMethod]
		public void SaveCollectControlList(List<WaterReadingWS> wrList)
		{            
			controller.SaveCollectControlList(wrList);
		}
    }
}
